package com.joe.codemother.service;

import com.joe.codemother.entity.dto.UserQueryRequest;
import com.joe.codemother.entity.vo.UserLoginVo;
import com.joe.codemother.entity.vo.UserVo;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.service.IService;
import com.joe.codemother.entity.User;
import jakarta.servlet.http.HttpServletRequest;

import java.util.List;

/**
 * 用户 服务层。
 *
 * @author joe
 */
public interface UserService extends IService<User> {

    long userRegister(String username, String password, String confirmPassword);

    UserLoginVo userLogin(String username, String password, HttpServletRequest request);

    User getLoginUser(HttpServletRequest request);

    UserLoginVo convertUserToVo(User user);

    boolean userLogOut(HttpServletRequest request);

    UserVo getUserVo(User user);

    List<UserVo> getUserVoList(List<User> users);

    QueryWrapper getQueryWrapper(UserQueryRequest userQueryRequest);

    String getEncryptedPassword(String password);
}
